fix: truncate long reference_id to avoid DB DataError#2248
fix: truncate long reference_id to avoid DB DataError#2248Sanjay-VK07 wants to merge 2 commits intoaboutcode-org:mainfrom
Conversation
Signed-off-by: Sanjay <vksanjay28@gmail.com>
521a57a to
a9c1396
Compare
|
Hi, I have fixed the DCO issue and all checks are now passing. Please let me know if any further changes are needed. Thanks! |
ziadhany
left a comment
There was a problem hiding this comment.
@Sanjay-VK07, looks good. Could you please run the pipeline and share the logs?
| MAX_REF_LEN = 200 | ||
| safe_ref_id = ref_id[:MAX_REF_LEN] if ref_id else ref_id |
There was a problem hiding this comment.
Can we also add "..." at the end of the truncated text to indicate that it has been shortened?
There was a problem hiding this comment.
Thanks for the suggestion!
I’ve updated the implementation to append "..." when truncating the reference_id to clearly indicate that it has been shortened.
I also ran the pipeline locally with proper Django setup. The tests are executing correctly.
Test summary:
39 failed, 885 passed, 1 skipped
The remaining failures are related to SQLite limitations as the project expects PostgreSQL.
Please let me know if any further changes are needed.
There was a problem hiding this comment.
@Sanjay-VK07 All tests should run successfully before we merge. You can paste the error logs, I might be able to help or do a quick search on the error text on google.
Signed-off-by: Sanjay <vksanjay28@gmail.com>
8008ded to
2408be8
Compare
Fixes issue where reference_id exceeds varchar limit causing DataError.
Closes #2190